<?php
// +----------------------------------------------------------------------
// | HkCms URL规则模型
// +----------------------------------------------------------------------
// | Copyright (c) 2012-2019 http://www.hkcms.cn, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 广州恒企教育科技有限公司 <admin@hkcms.cn>
// +----------------------------------------------------------------------

namespace app\content\model;

use common\model\Model as ComModel;

class Urlrule extends ComModel
{
    /**
     * 更新URL规则 缓存
     */
    public function urlrule_cache()
    {
        //完整数据缓存
        $data = array();
        foreach ($this->select()->toarray() as $roleid => $r) {
            $data[$r['urlruleid']] = $r;
        }
        cache('Urlrules', $data);
        return $data;
    }
}